//
// Created by shine on 2019/11/10.
//

#ifndef INC_360VRQE_YUVREADER_H
#define INC_360VRQE_YUVREADER_H

#include <iostream>
#include <fstream>
#include <string>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;

class yuvReader{

public:

    yuvReader(const string& filePath, const string& width, const string& height);
    ~yuvReader()= default;
    void Play();
    void addNoise();
    void Cut(const string& outputYUV, int startFrame, int endFrame);

private:

    string _filePath;
    string _videoName;
    int _videoWidth;
    int _videoHeight;
    int _framePixelNums;
    unsigned long _FrameCount;
    ifstream _fin;

    FILE* _fileIn;
//    unsigned char*  _pYuvBuf;
    Mat _rgbFrame;
    Mat _yuvFrame;

    FILE* _FileOut;



};
#endif //INC_360VRQE_YUVREADER_H
